docker run -d -v ~/docker_registory:/var/lib/registry -p 5000:5000  -e REGISTRY_STORAGE_DELETE_ENABLED=true --name myregistry registry:2

docker pull 127.0.0.1:5000/java:8
docker tag 127.0.0.1:5000/java:8  java:8
docker rmi 127.0.0.1:5000/java:8

docker pull 127.0.0.1:5000/tomcat:8
docker tag 127.0.0.1:5000/tomcat:8 tomcat:8
docker rmi 127.0.0.1:5000/tomcat:8

docker pull 127.0.0.1:5000/tomcat:7-jre7
docker tag 127.0.0.1:5000/tomcat:7-jre7 tomcat:7-jre7
docker rmi 127.0.0.1:5000/tomcat:7-jre7

# 查询镜像列表
curl http://127.0.0.1:5000/v2/_catalog
# 查询指定镜像的tags列表
curl http://127.0.0.1:5000/v2/tomcat/tags/list
# 查询tag对应的digest
curl  -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' -D - http://127.0.0.1:5000/v2/openjdk/manifests/8-jdk-alpine
curl  -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' -I http://127.0.0.1:5000/v2/openjdk/manifests/8-jdk-alpine
# 删除指定的tag
curl -X DELETE -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' http://127.0.0.1:5000/v2/cash-compass/manifests/sha256:7defe0efedb45dbaa8d77768071420bb98bffc62495ba49e1fdfa54e34929688